package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class GetDescriptorInformation {

    private int beginIndex;
    private int endIndex;
    private GetHeaderInformationList getHeaderInformationList;
    private SimpleValueSpecification itemNumber;
    private GetItemInformationList getItemInformationList;

    public GetDescriptorInformation(GetHeaderInformationList getHeaderInformationList) {
        this.beginIndex = getHeaderInformationList.get(0).getEndIndex();
        this.endIndex = getHeaderInformationList.get(getHeaderInformationList.size() - 1).getEndIndex();
        this.getHeaderInformationList = getHeaderInformationList;
    }

    public GetDescriptorInformation(int beginIndex,
                                    SimpleValueSpecification itemNumber,
                                    GetItemInformationList getItemInformationList) {
        this.beginIndex = beginIndex;
        this.endIndex = getItemInformationList.get(getItemInformationList.size() - 1).getEndIndex();
        this.itemNumber = itemNumber;
        this.getItemInformationList = getItemInformationList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public GetHeaderInformationList getGetHeaderInformationList() {
        return getHeaderInformationList;
    }

    public SimpleValueSpecification getItemNumber() {
        return itemNumber;
    }

    public GetItemInformationList getGetItemInformationList() {
        return getItemInformationList;
    }

}
